<template>
  <template v-for="(el, index) in childrenList">
    <template v-if="el.type !== 'group'">
      <widget-view :value="el" :preview="true" :key="index" v-if="el.show">
      </widget-view>
    </template>

    <template v-if="el && el.children">
      <preview-child-item
        :children-list="el && el.children"
        :key="index"
      ></preview-child-item>
    </template>
  </template>
</template>

<script>
import WidgetView from '../widget-view.vue';

export default {
  components: {
    WidgetView
  },
  props: {
    childrenList: Array
  }
};
</script>
<style scoped lang="scss"></style>
